package utils;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Created by XiaoMing on 2017/11/16.
 */
@Data
@NoArgsConstructor
public class GeneralHttpResult<T> {

    private int statusCode;
    private T content;

    public GeneralHttpResult(int statusCode, T content) {
        this.statusCode = statusCode;
        this.content = content;
    }

    public boolean isOk() {
        return statusCode >= 200 && statusCode < 300;
    }
}
